package 建造者模式.建造者模式实现一.director;

import 建造者模式.建造者模式实现一.product.Bike;
import 建造者模式.建造者模式实现一.builder.Builder;

/**
 * @author wzx
 * @date 2024/8/28 16:37
 * @description: 指挥者类
 */
public class Director {


    private Builder mBuilder;

    public Director(Builder mBuilder) {
        this.mBuilder = mBuilder;
    }

    public Bike construct(){
        mBuilder.buildFrame();
        mBuilder.buildSeat();
        return mBuilder.createBike();
    }
}
